Skip to content

Fix egress, CSV, AI errors, and demo date hygiene - #40

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-public-readiness-bugs-9b7f
Aug 9, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/fix-public-readiness-bugs-9b7f

Conversation

@Modsofthenation

@Modsofthenation Modsofthenation commented Aug 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adversarial functionality review found several public-readiness bugs that would surprise users (or violate the documented egress model).

Changes

  • Remove Home auto sync-all — integrations stay explicit (Settings / person page / Sync all button)
  • CSV import requires an EM (or defaultManagerId) so imports cannot create manager-less orphans invisible on Team
  • Team roster always shows the EM row, even when directs exist
  • Writing Desk + Settings catch AI/test failures and surface them instead of unhandled rejections
  • Demo seed uses rolling relative dates so the open cycle and “recent” evidence stay in-window

Test plan

  • pnpm test (68 pass on this branch)
  • Home load does not call /api/integrations/sync-all
  • CSV import with empty roster → 400 requiring EM
  • After EM + directs, Team table shows EM first
  • Writing Desk AI with AI disabled shows an error message
  • Fresh demo seed: current cycle windowEnd is in the future; recent evidence dates fall inside the window
Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Added clearer AI connection testing across Settings, with consistent success and error messages.
    • Improved Writing Desk error handling for drafting, synthesis, bias checking, and related AI actions.
    • Team rosters now display the EM separately alongside direct reports.
  • Bug Fixes

    • People imports now require an existing EM or an explicitly provided default manager.
    • Updated CSV import guidance to clarify reporting requirements.
  • Improvements

    • Sample data now uses dates relative to the current date.
    • Removed automatic background integration synchronization from the Home page.

Stop silent Home auto sync-all (egress must stay explicit). Require an EM
before CSV people import so orphan managers cannot vanish from the roster,
and always show the EM row on Team. Surface AI/test failures on Writing Desk
and Settings instead of unhandled rejections. Seed demo cycles and evidence
on rolling relative dates so the open window stays current.

Co-authored-by: Damon  <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b24dca43-0eff-420a-ae2c-febc03ceb1ad

📥 Commits

Reviewing files that changed from the base of the PR and between 393cb58 and 7f4c130.

📒 Files selected for processing (6)
  • apps/api/src/index.ts
  • apps/api/src/seed.ts
  • apps/ui/src/pages/HomePage.tsx
  • apps/ui/src/pages/SettingsPage.tsx
  • apps/ui/src/pages/TeamPage.tsx
  • apps/ui/src/pages/WritingDeskPage.tsx

📝 Walkthrough

Walkthrough

People imports now validate manager resolution. Seed data uses current UTC-relative dates. Home synchronization timers were removed. AI connection tests and Writing Desk actions now use centralized error handling.

Changes

People import and team roster

Layer / File(s) Summary
Manager validation and EM roster
apps/api/src/index.ts, apps/ui/src/pages/TeamPage.tsx
Imports now require an EM or defaultManagerId. The Team page always shows the EM and updates CSV guidance.

Relative seed data

Layer / File(s) Summary
Dynamic cycle and record dates
apps/api/src/seed.ts
Seeded cycles and related records now use dates derived from the current UTC date.

Home synchronization

Layer / File(s) Summary
Remove scheduled integration synchronization
apps/ui/src/pages/HomePage.tsx
The Home page no longer starts or manages scheduled integration synchronization.

AI interaction handling

Layer / File(s) Summary
Centralized AI connection testing
apps/ui/src/pages/SettingsPage.tsx
All AI connection test entry points use one handler for success and failure reporting.
Centralized Writing Desk AI errors
apps/ui/src/pages/WritingDeskPage.tsx
AI actions use runAiAction for shared error handling while preserving successful state updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: cursoragent

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-public-readiness-bugs-9b7f

Comment @coderabbitai help to get the list of available commands.

@Modsofthenation
Modsofthenation marked this pull request as ready for review August 9, 2026 11:51
@cursor
cursor Bot merged commit a42f86c into main Aug 9, 2026
2 of 3 checks passed
@cursor
cursor Bot deleted the cursor/fix-public-readiness-bugs-9b7f branch August 9, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants